window.EcExtension?.ready?.(() => {
    if (window.ecodeSDK && location.hash.startsWith('#/main/cube/search')) {
        window.EcExtension.Menus.register('编辑建模查询', () => {
            window.localStorage.setItem('cube_app_list_selectedKey', window.ModeList.getCustomID())
            window.open(`/wui/engine.html#/cubeengine/app/list?_key=${new Date().getTime()}`)
        })

        window.EcExtension.Menus.register('编辑建模模块', () => {
            window.localStorage.setItem('cube_app_mode_selectedKey', window.ModeList.getModeID())
            window.open(`/wui/engine.html#/cubeengine/app/mode?_key=${new Date().getTime()}`)
        })
    }
})